/*
 * common.h
 *
 *  Created on: Nov 5, 2016
 *      Author: root
 */

#ifndef COMMON_H_
#define COMMON_H_

#include "../premise/premise.h"

#define MACRO_DEF_TEMPLATE    "deftpl"


#define FILE_TYPE_TEMPLATE 1
#define FILE_TYPE_FILE     2
#define FILE_TYPE_PACKAGE  3

// Map macros;
void init_macro_functions(Funny *globalFunny);
void *get_macro_function(String name);
String macro_function(String functionName, int argc, Statement **argv);
void generate_code();
void* generate_scheme_code(FILE *in, FILE *out, void* module);

String eval_sys(Mapping *m, Queue *repQueue);
Queue *get_mappings(Statement *s);

#endif /* COMMON_H_ */
